<?php
/**
 * XPress - WordPress for XOOPS
 *
 * Adding multi-author features to XPress
 *
 * @copyright	The XOOPS project http://xoopscube.org/
 * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
 * @author		Taiwen Jiang (phppp or D.J.) <php_pp@hotmail.com>
 * @since		2.04
 * @version		$Id$
 * @package		module::wordpress
 */
if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;

$modversion['name'] = _MI_WORDPRESS_NAME;
$modversion['description'] = _MI_WORDPRESS_DESC;
$modversion['version'] = "2.2.1";
$modversion['credits'] = "Wordpress DEV (http://wordpress.org/development/); Wordpress ME by nobunobu (http://www.kowa.org/); Graphics/Test by insraq (http://insraq.xoops.cn) Wordpress 2.2.1 by Sven Seidel (http://www.xoopszone.de)";
$modversion['author'] = "D.J. (phppp, http://xoops.org.cn, http://xoopsforge.com)";
$modversion['license'] = "GPL see LICENSE";
$modversion['image'] = "images/wordpress.png";
$modversion['dirname'] = "wordpress";

// status
$modversion['codename'] = "XOOPS";

$modversion['onInstall'] = 'include/module.php';
$modversion['onUpdate'] = 'include/module.php';

// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";

$modversion['tables'] = array(
	"wp_categories",
	"wp_comments",
	"wp_linkcategories",
	"wp_links",
	"wp_options",
	"wp_post2cat",
	"wp_postmeta",
	"wp_posts",
	"wp_users",
	"wp_usermeta",
	"wp_views"
	);

// Search
$modversion['hasSearch'] = 1;
$modversion['search']['file'] = "include/search.php";
$modversion['search']['func'] = "wp_search";

//Admin things
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";

$modversion['hasMain'] = 1;
if(is_object($GLOBALS["xoopsUser"])){
	$modversion['sub'][1]['name'] = _MI_WORDPRESS_MENU_SUBMIT;
	$modversion['sub'][1]['url'] = "wp-admin/post.php";
}

// Use smarty
$modversion["use_smarty"] = 1;

/**
* Templates
*/
$i = 0;
$modversion['templates'][$i++] = array( 'file'			=> 'wp_index.html',
										'description'	=> 'for index page'
										);
$modversion['templates'][$i++] = array( 'file'			=> 'wp_sidebar.html',
										'description'	=> 'Sidebar'
										);
$modversion['templates'][$i++] = array( 'file'			=> 'wp_home.html',
										'description'	=> 'For homepage'
										);
$modversion['templates'][$i++] = array( 'file'			=> 'wp_header.html',
										'description'	=> 'For page header'
										);

// css
$modversion['css'][] = 'templates/wordpress/style.css';

$modversion['hasconfig'] = 1;

$modversion['config'][] = array(
	'name'			=> 'enable_mu' ,
	'title'			=> '_MI_WORDPRESS_ENABLE_MU' ,
	'description'	=> '_MI_WORDPRESS_ENABLE_MU_DESC' ,
	'formtype'		=> 'yesno' ,
	'valuetype'		=> 'int' ,
	'default'		=> 1
);

$modversion['config'][] = array(
	'name'			=> 'num_posts' ,
	'title'			=> '_MI_WORDPRESS_NUM_POSTS' ,
	'description'	=> '_MI_WORDPRESS_NUM_POSTS_DESC' ,
	'formtype'		=> 'textbox' ,
	'valuetype'		=> 'int' ,
	'default'		=> "5",
);

$modversion['config'][] = array(
	'name'			=> 'num_comments' ,
	'title'			=> '_MI_WORDPRESS_NUM_COMMENTS' ,
	'description'	=> '_MI_WORDPRESS_NUM_COMMENTS_DESC' ,
	'formtype'		=> 'textbox' ,
	'valuetype'		=> 'int' ,
	'default'		=> "5",
);

$modversion['config'][] = array(
	'name'			=> 'num_authors' ,
	'title'			=> '_MI_WORDPRESS_NUM_AUTHORS' ,
	'description'	=> '_MI_WORDPRESS_NUM_AUTHORS_DESC' ,
	'formtype'		=> 'textbox' ,
	'valuetype'		=> 'int' ,
	'default'		=> "5",
);

$modversion['config'][] = array(
	'name'			=> 'length_comment' ,
	'title'			=> '_MI_WORDPRESS_LENGTH_COMMENT' ,
	'description'	=> '_MI_WORDPRESS_LENGTH_COMMENT_DESC' ,
	'formtype'		=> 'textbox' ,
	'valuetype'		=> 'int' ,
	'default'		=> "30",
);

$modversion['config'][] = array(
	'name'			=> 'style' ,
	'title'			=> '_MI_WORDPRESS_STYLE' ,
	'description'	=> '_MI_WORDPRESS_STYLE_DESC' ,
	'formtype'		=> 'select' ,
	'valuetype'		=> 'int' ,
	'default'		=> 0,
	'options'		=> array("XOOPS"=>1, "Wordpress"=>2, "Selectable"=>0) 
);

$modversion['config'][] = array(
	'name'			=> 'rss_charset' ,
	'title'			=> '_MI_WORDPRESS_RSSCHARSET' ,
	'description'	=> '_MI_WORDPRESS_RSSCHARSET_DESC' ,
	'formtype'		=> 'select' ,
	'valuetype'		=> 'int' ,
	'default'		=> 0,
	'options'		=> array("UTF-8"=>0, "WordPress"=>1, "XOOPS"=>2) 
);

$modversion['config'][] = array(
	'name'			=> 'show_excerpt' ,
	'title'			=> '_MI_WORDPRESS_SHOWEXCERPT' ,
	'description'	=> '_MI_WORDPRESS_SHOWEXCERPT_DESC' ,
	'formtype'		=> 'yesno' ,
	'valuetype'		=> 'int' ,
	'default'		=> 0
);

$modversion['blocks']= array();

$modversion['blocks'][1]['file'] = "wp_calendar.php";
$modversion['blocks'][1]['name'] = _MI_WORDPRESS_BLOCK_CALENDAR;
$modversion['blocks'][1]['description'] = "";
$modversion['blocks'][1]['show_func'] = "b_wordpress_calendar_show";
$modversion['blocks'][1]['template'] = "wp_block_calendar.html";

$modversion['blocks'][2]['file'] = "wp_sidebar.php";
$modversion['blocks'][2]['name'] = _MI_WORDPRESS_BLOCK_SIDEBAR;
$modversion['blocks'][2]['description'] = "";
$modversion['blocks'][2]['show_func'] = "b_wordpress_sidebar_show";
$modversion['blocks'][2]['edit_func'] = "b_wordpress_sidebar_edit";
$modversion['blocks'][2]['options'] = "1|1|1|1|monthly";
$modversion['blocks'][2]['template'] = "wp_block_sidebar.html";

$modversion['blocks'][6]['file'] = "wp_posts.php";
$modversion['blocks'][6]['name'] = _MI_WORDPRESS_BLOCK_POSTS;
$modversion['blocks'][6]['description'] = "";
$modversion['blocks'][6]['show_func'] = "b_wordpress_posts_show";
$modversion['blocks'][6]['edit_func'] = "b_wordpress_posts_edit";
$modversion['blocks'][6]['options'] = "10|1|7|0";
$modversion['blocks'][6]['template'] = "wp_block_posts.html";

$modversion['blocks'][7]['file'] = "wp_comments.php";
$modversion['blocks'][7]['name'] = _MI_WORDPRESS_BLOCK_COMMENTS;
$modversion['blocks'][7]['description'] = "";
$modversion['blocks'][7]['show_func'] = "b_wordpress_comments_show";
$modversion['blocks'][7]['edit_func'] = "b_wordpress_comments_edit";
$modversion['blocks'][7]['options'] = "10|30|0";
$modversion['blocks'][7]['template'] = "wp_block_comments.html";

$modversion['blocks'][9]['file'] = "wp_authors.php";
$modversion['blocks'][9]['name'] = _MI_WORDPRESS_BLOCK_AUTHORS;
$modversion['blocks'][9]['description'] = "";
$modversion['blocks'][9]['show_func'] = "b_wordpress_authors_show";
$modversion['blocks'][9]['edit_func'] = "b_wordpress_authors_edit";
$modversion['blocks'][9]['options'] = "10|0|0";
$modversion['blocks'][9]['template'] = "wp_block_authors.html";

$modversion['blocks'][10]['file'] = "wp_content.php";
$modversion['blocks'][10]['name'] = _MI_WORDPRESS_BLOCK_CONTENT;
$modversion['blocks'][10]['description'] = "";
$modversion['blocks'][10]['show_func'] = "b_wordpress_content_show";
$modversion['blocks'][10]['edit_func'] = "b_wordpress_content_edit";
$modversion['blocks'][10]['options'] = "10|0";
$modversion['blocks'][10]['template'] = "wp_block_content.html";
?>